#define _CRT_SECURE_NO_WARNINGS 1

//#include<stdio.h>
//
//int main()
//{
//	char str[32] = "xxxxxxx";
//	scanf("%s", str);
//	int a = 0;
//	return 0;
//}

#include <stdio.h>

char* reverse(char* str)
{
    char* cur = str;
    int count = 0;
    while (*cur != '\0')
    {
        count++;
        cur++;
    }
    int left = 0;
    int right = count - 1;
    char tmp = 0;
    while (left < right)
    {
        tmp = str[left];
        str[left] = str[right];
        str[right] = tmp;
        left++;
        right--;
    }
    return str;
}

int main() {
    char str[32] = { 0 };
    scanf("%s", str);
    printf("%s", reverse(str));
    return 0;
}